import React from "react";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import PreAdminHome from "../screens/preparationAdmin/PreAdminHome";
import SampleVillageAdd from "../screens/preparationAdmin/SampleVillageAdd";
import { Feather } from "@expo/vector-icons";
import Requirement from "../screens/preparation/Requirement";
import { ArticleProvider } from "../context/preparation/ArticleContext";
import Formulation from "../screens/preparation/Formulation";
import Organization from "../screens/preparation/Organization";
import ScoreManage from "../screens/preparationAuditor/ScoreManage";
import TestViewing from "../screens/preparationAdmin/TestViewing";
import { SampleVillageProvider } from "../context/preparation/SampleVillageContext";
import SampleVillageManage from "../screens/preparationAdmin/SampleVillageManage";
import SampleVillageEdit from "../screens/preparationAdmin/SampleVillageEdit";
import SampleVillageSelected from "../screens/preparationAdmin/SampleVillageSelected";
import ResearchManage from "../screens/preparationAuditor/ResearchManage";
import ResearchExamine from "../screens/preparationAuditor/ResearchExamine";
const Stack = createNativeStackNavigator();

const PreparationAdminNavigation = ({ navigation }) => {
  return (
    <SampleVillageProvider>
      <ArticleProvider>
        <Stack.Navigator
          initialRouteName="Research"
          screenOptions={{
            headerTitleAlign: "center",
            headerTintColor: "#fff",
            headerStyle: {
              backgroundColor: "#A80108",
            },
          }}
        >
          <Stack.Screen
            name="PreAdminHome"
            component={PreAdminHome}
            options={{
              headerShown: true,
              title: "准备工作",
              headerLeft: () => (
                <Feather
                  name="user"
                  style={{ padding: 5 }}
                  size={25}
                  color="#fff"
                  onPress={() => navigation.openDrawer()}
                />
              ),
            }}
          />
          <Stack.Screen
            name="SampleVillageAdd"
            component={SampleVillageAdd}
            options={{
              headerShown: true,
              title: "添加样本村",
            }}
          />
          <Stack.Screen
            name="SampleVillageEdit"
            component={SampleVillageEdit}
            options={{
              headerShown: true,
              title: "样本村编辑",
            }}
          />
          <Stack.Screen
            name="SampleVillageSelected"
            component={SampleVillageSelected}
            options={{
              headerShown: true,
              title: "样本村发布",
            }}
          />
          <Stack.Screen
            name="SampleVillageManage"
            component={SampleVillageManage}
            options={{
              headerShown: true,
              title: "样本村管理",
            }}
          />
          <Stack.Screen
            name="Requirement"
            component={Requirement}
            options={{
              headerShown: true,
              title: "总体要求",
            }}
          />
          <Stack.Screen
            name="Organization"
            component={Organization}
            options={{
              headerShown: true,
              title: "组织架构",
            }}
          />
          <Stack.Screen
            name="Formulation"
            component={Formulation}
            options={{
              headerShown: true,
              title: "工作方案",
            }}
          />
          <Stack.Screen
            name="ScoreManage"
            component={ScoreManage}
            options={{
              headerShown: true,
              title: "成绩查询",
            }}
          />
          <Stack.Screen
            name="TestViewing"
            component={TestViewing}
            options={{
              headerShown: true,
              title: "试卷查看",
            }}
          />
          <Stack.Screen
            name="ResearchManage"
            component={ResearchManage}
            options={{
              headerShown: true,
              title: "调研报告审核",
            }}
          />
          <Stack.Screen
            name="ResearchExamine"
            component={ResearchExamine}
            options={{
              headerShown: true,
              title: "调研报告审核",
            }}
          />
        </Stack.Navigator>
      </ArticleProvider>
    </SampleVillageProvider>
  );
};

export default PreparationAdminNavigation;
